<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	request.setCharacterEncoding("utf-8");
// 	int su1 = Integer.parseInt(request.getParameter("su1"));
// 	int su2 = Integer.parseInt(request.getParameter("su2"));
//	여기에 있으면 입력값이 없는데 int형으로 변환하려고 하다보니 에러 난다.
	
	if(request.getParameter("su1").equals("")||request.getParameter("su2").equals("")){
		out.println("<script>alert('값을 이력하여 주십시요');history.go(-1)</script>");
	}else{
		int su1 = Integer.parseInt(request.getParameter("su1"));
		int su2 = Integer.parseInt(request.getParameter("su2"));
		
		if(su1<su2){
			for(int a=su1;a<=su2;a++){
				if(a%3==0) out.print(a+" ");
			}
		}else if(su2<su1){
			for(int a=su2;a<=su1;a++){
				if(a%3==0) out.print(a+" ");
		}
	}
}
%>
</body>
</html>